// 对象类型  const 变量:{属性名:类型;属性2:类型}={值}   ?代表可选,
// 对象的key不确定，值要是string {[e:string]:string}
type Person = {
  name: string
  age: number
  sex: boolean
  address?: {
    province: string
    city: string
  }
  say: () => void
}
type xxx = { name: string; age: string }

const person: Person = {
  name: '张三',
  age: 20,
  sex: true,
  say: () => {
    console.log(123)
  }
}

const obj: { [e: string]: string } = {}
obj.xxx = '123'

export {}
